# coding=utf-8
from excel import BaseExcel
from openpyxl import Workbook
wb = Workbook()  # 新建工作簿
ws = wb.active  # 获取工作表
be = BaseExcel(ws)
be.head = "学生信息收集表"
be.title = ['姓名', '学号', '年龄']
be.append(['张三', "1101", 17])
be.append(['李四', "3412", 18])
be.append(['王五', "1103", 16])
be.append(["", "合计", 3], result=True)
be.execute()
wb.save(r'..\resource\测试2.xlsx')  # 保存到指定路径